<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta
      name="viewport"
      content="width=device-width, initial-scale=1, maximum-scale=1"
    />
    <title>企业用电</title>
    <!-- css of 3rd party  -->
    <link
      href="static/layui-2.3.0/css/layui.css"
      type="text/css"
      rel="stylesheet"
    />
    <link
      href="static/font-awesome-4.7.0/css/font-awesome.min.css"
      type="text/css"
      rel="stylesheet"
    />
    <!-- css of this project  -->
    <link
      href="static/jtopo/css/jtopo-editor.css"
      type="text/css"
      rel="stylesheet"
    />
    <link href="static/jtopo/css/index.css" type="text/css" rel="stylesheet" />
  </head>

  <body class="layui-layout-body">
    <div class="layui-layout layui-layout-admin">
      <div class="container">
        <div class="layui-row custom-container">
          <div class="custom-container-right">
            <div id="topology-body" class="topology-context topology-context-nobg">
              <canvas class="topology-context topology-context-nobg" id="topology-canvas">
                您的浏览器不支持HTML5!
              </canvas>
            </div>
          </div>
        </div>
      </div>
    </div>
  </body>

  <!-- js of 3rd party  -->
  <script
    src="static/jquery-3.3.1/jquery-3.3.1.min.js"
    type="text/javascript"
  ></script>
  <script src="static/layui-2.3.0/layui.all.js" type="text/javascript"></script>
  <!-- js of this project  -->
  <script src="static/jtopo/js/util.js" type="text/javascript"></script>
  <script
    src="static/jtopo/js/jtopo-0.4.8-dev.js"
    type="text/javascript"
  ></script>
  <script src="static/jtopo/js/jtopo-editor-view.js" type="text/javascript"></script>
  <script type="text/javascript">
    // 设置canvas画布大小
    var canvas = document.getElementById("topology-canvas");
    canvas.height = $(document).height()-7;
    // canvas.height = 948;
    // canvas.width = 1640;

    $(document).ready(function () {
      editor.loadTopology(`https://electricity-api-service-pre.airqualitychina.cn/v1/enterprise-flowchart`, "img/backimg.png");
    });
  </script>
</html>
